<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
  body{
    height: 2000px;
  }
  #home{
      display: block;
      margin: 1000px auto;
  }
</style>
<body>
   <h1 id="热门">热门</h1>
    <input type="text" name="admin" placeholder="输入数字" ><input type="submit" name="submit">
   
    <label for="hot"> <input id="hot" type="checkbox" name="hot" />热门 </label>
    <a href="#热门" id="home" >后盾人</a>
  <script>
        //dom元素基本上都是字符串，要转换为int类型
let input=document.querySelector('[name="admin"]');
let sub=document.querySelector(`[name="submit"]`);

sub.addEventListener("click",function(){
   let nums= parseInt(input.value)+100;
   console.log(nums);

})
const node = document.querySelector(`[name='hot']`)
  node.addEventListener('change', function () {
    console.log(this.checked)
  })

  //href的值
  const a = document.querySelector(`#home`)
  console.log(a.href)
    </script>
</body>
</html>